import Vue from 'vue'
import Router from 'vue-router'
import AuthLayout from '../components/auth/AuthLayout'
import AppLayout from '../components/admin/AppLayout'

Vue.use(Router)

const EmptyParentComponent = {
  template: '<router-view></router-view>',
}

const demoRoutes = []

export default new Router({
  mode: 'history',
  routes: [
    ...demoRoutes,
    // {
    //   path: '*',
    //   redirect: { name: 'dashboard' },
    // },
    {
      path: '*',
      redirect: { name: 'welecome' },
    },
    {
      path: '/auth',
      component: AuthLayout,
      children: [
        {
          name: 'login',
          path: 'login',
          component: () => import('../components/auth/login/Login.vue'),
        },
        // {
        //   name: 'signup',
        //   path: 'signup',
        //   component: () => import('../components/auth/signup/Signup.vue'),
        // },
        // {
        //   name: 'recover-password',
        //   path: 'recover-password',
        //   component: () => import('../components/auth/recover-password/RecoverPassword.vue'),
        // },
        {
          path: '',
          redirect: { name: 'login' },
        },
      ],
    },
    {
      path: '/404',
      component: EmptyParentComponent,
      children: [
        {
          name: 'not-found-advanced',
          path: 'not-found-advanced',
          component: () => import('../components/pages/404-pages/VaPageNotFoundSearch.vue'),
        },
        {
          name: 'not-found-simple',
          path: 'not-found-simple',
          component: () => import('../components/pages/404-pages/VaPageNotFoundSimple.vue'),
        },
        {
          name: 'not-found-custom',
          path: 'not-found-custom',
          component: () => import('../components/pages/404-pages/VaPageNotFoundCustom.vue'),
        },
        {
          name: 'not-found-large-text',
          path: '/pages/not-found-large-text',
          component: () => import('../components/pages/404-pages/VaPageNotFoundLargeText.vue'),
        },
      ],
    },
    {
      name: 'Admin',
      path: '/admin',
      component: AppLayout,
      children: [
        {
          name: 'welecome',
          path: 'welecome',
          component: () => import('../components/welecome/Welecome.vue'),
          default: true,
        },
        // {
        //   name: 'dashboard',
        //   path: 'dashboard',
        //   component: () => import('../components/dashboard/Dashboard.vue'),
        //   default: true,
        // },
        // {
        //   name: 'statistics',
        //   path: 'statistics',
        //   component: EmptyParentComponent,
        //   children: [
        //     {
        //       name: 'charts',
        //       path: 'charts',
        //       component: () => import('../components/statistics/charts/Charts.vue'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Charts',
        //       },
        //     },
        //     {
        //       name: 'progress-bars',
        //       path: 'progress-bars',
        //       component: () => import('../components/statistics/progress-bars/ProgressBars.vue'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Progress-Bars',
        //       },
        //     },
        //   ],
        // },
        // {
        //   name: 'forms',
        //   path: 'forms',
        //   component: EmptyParentComponent,
        //   children: [
        //     {
        //       name: 'form-elements',
        //       path: 'form-elements',
        //       component: () => import('../components/forms/form-elements/FormElements.vue'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/inputs',
        //       },
        //     },
        //     {
        //       name: 'medium-editor',
        //       path: 'medium-editor',
        //       component: () => import('../components/forms/medium-editor/MediumEditor.vue'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Medium-Editor',
        //       },
        //     },
        //   ],
        // },
        {
          name: 'checkin',
          path: 'checkin',
          component: EmptyParentComponent,
          children: [
            {
              name: 'checkin-add',
              path: 'checkin-add',
              component: () => import('../components/checkin/CheckinAdd.vue'),
            },
            {
              name: 'checkin-list',
              path: 'checkin-list',
              component: () => import('../components/checkin/CheckinList.vue'),
            },
            {
              name: 'checkin-mod',
              path: 'checkin-mod',
              component: () => import('../components/checkin/CheckinMod.vue'),
            },
          ],
        },
        {
          name: 'checkout',
          path: 'checkout',
          component: EmptyParentComponent,
          children: [
            {
              name: 'checkout-add',
              path: 'checkout-add',
              component: () => import('../components/checkout/CheckoutAdd.vue'),
            },
            {
              name: 'checkout-list',
              path: 'checkout-list',
              component: () => import('../components/checkout/CheckoutList.vue'),
            },
            {
              name: 'checkout-mod',
              path: 'checkout-mod',
              component: () => import('../components/checkout/CheckoutMod.vue'),
            },
          ],
        },
        {
          name: 'floor',
          path: 'floor',
          component: EmptyParentComponent,
          children: [
            {
              name: 'floor-add',
              path: 'floor-add',
              component: () => import('../components/floor/FloorAdd.vue'),
            },
            {
              name: 'floor-list',
              path: 'floor-list',
              component: () => import('../components/floor/FloorList.vue'),
            },
            {
              name: 'floor-mod',
              path: 'floor-mod',
              component: () => import('../components/floor/FloorMod.vue'),
            },
          ],
        },
        {
          name: 'order',
          path: 'order',
          component: EmptyParentComponent,
          children: [
            {
              name: 'order-list',
              path: 'order-list',
              component: () => import('../components/order/OrderManage.vue'),
            },
          ],
        },
        {
          name: 'user',
          path: 'user',
          component: EmptyParentComponent,
          children: [
            {
              name: 'management-list',
              path: 'management-list',
              component: () => import('../components/user/UserManage.vue'),
            },
            {
              name: 'user-mod',
              path: 'user-mod',
              component: () => import('../components/user/UserMod.vue'),
            },
          ],
        },
        {
          name: 'role',
          path: 'role',
          component: EmptyParentComponent,
          children: [
            {
              name: 'role-list',
              path: 'role-list',
              component: () => import('../components/role/RoleManage'),
            },
          ],
        },
        {
          name: 'room',
          path: 'room',
          component: EmptyParentComponent,
          children: [
            {
              name: 'room-list',
              path: 'room-list',
              component: () => import('../components/room/RoomList'),
            },
          ],
        },

        {
          name: 'power',
          path: 'power',
          component: EmptyParentComponent,
          children: [
            {
              name: 'power-list',
              path: 'power-list',
              component: () => import('../components/power/PowerManage'),
            },
          ],
        },
        {
          name: 'room',
          path: 'room',
          component: EmptyParentComponent,
          children: [
            {
              name: 'room-list',
              path: 'room-list',
              component: () => import('../components/room/RoomList'),
            },
            {
              name: 'room-type',
              path: 'room-type',
              component: () => import('../components/roomtype/RoomTypeList'),
            }
          ],
        },
        {
          name: 'city',
          path: 'city',
          component: EmptyParentComponent,
          children: [
            {
              name: 'city-list',
              path: 'city-list',
              component: () => import('../components/city/CityManage'),
            },
          ],
        },
        {
          name: 'hotel',
          path: 'hotel',
          component: EmptyParentComponent,
          children: [
            {
              name: 'hotel-list',
              path: 'hotel-list',
              component: () => import('../components/hotel/HotelManage'),
            },
          ],
        },
        {
          name: 'profit',
          path: 'profit',
          component: EmptyParentComponent,
          children: [
            {
              name: 'profit-list',
              path: 'profit-list',
              component: () => import('../components/profit/ProfitManage'),
            },
          ],
        },
        {
          name: 'dict',
          path: 'dict',
          component: EmptyParentComponent,
          children: [
            {
              name: 'dict-list',
              path: 'dict-list',
              component: () => import('../components/dict/DictList'),
            },
          ],
        },
        // {
        //   name: 'tables',
        //   path: 'tables',
        //   component: EmptyParentComponent,
        //   children: [
        //     {
        //       name: 'markup',
        //       path: 'markup',
        //       component: () => import('../components/markup-tables/MarkupTables.vue'),
        //       wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Tables', // TODO Update docs
        //     },
        //     {
        //       name: 'data',
        //       path: 'data',
        //       component: () => import('../components/data-tables/DataTables.vue'),
        //       wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Tables', // TODO Add docs
        //     },
        //   ],
        // },
        // {
        //   name: 'ui',
        //   path: 'ui',
        //   component: EmptyParentComponent,
        //   children: [
        //     {
        //       name: 'typography',
        //       path: 'typography',
        //       component: () => import('../components/ui/typography/Typography.vue'),
        //     },
        //     {
        //       name: 'buttons',
        //       path: 'buttons',
        //       component: () => import('../components/ui/buttons/Buttons'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Buttons',
        //       },
        //     },
        //     {
        //       name: 'rating',
        //       path: 'rating',
        //       component: () => import('../components/ui/rating/Rating'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Rating',
        //       },
        //     },
        //     {
        //       name: 'color-pickers',
        //       path: 'color-pickers',
        //       component: () => import('../components/ui/color-pickers/ColorPickers'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Color-Pickers',
        //       },
        //     },
        //     {
        //       name: 'timelines',
        //       path: 'timelines',
        //       component: () => import('../components/ui/timelines/Timelines'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Timelines',
        //       },
        //     },
        //     {
        //       name: 'notifications',
        //       path: 'notifications',
        //       component: () => import('../components/ui/notifications/Notifications'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Notifications',
        //       },
        //     },
        //     {
        //       path: 'icons',
        //       component: () => import('../components/ui/icons/Icons'),
        //       children: [
        //         {
        //           name: 'icon-sets',
        //           path: '', // Default route
        //           component: () => import('../components/ui/icons/SetsList'),
        //           meta: {
        //             wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Icons',
        //           },
        //         },
        //         {
        //           name: 'icon-set',
        //           path: ':name',
        //           component: () => import('../components/ui/icons/IconSet'),
        //           props: true,
        //           meta: {
        //             wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Icons',
        //           },
        //         },
        //       ],
        //     },
        //     {
        //       name: 'spinners',
        //       path: 'spinners',
        //       component: () => import('../components/ui/spinners/Spinners'),
        //     },
        //     {
        //       name: 'grid',
        //       path: 'grid',
        //       component: () => import('../components/ui/grid/Grid'),
        //     },
        //     {
        //       name: 'modals',
        //       path: 'modals',
        //       component: () => import('../components/ui/modals/Modals'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Modals',
        //       },
        //     },
        //     {
        //       name: 'cards',
        //       path: 'cards',
        //       component: () => import('../components/ui/cards/Cards'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Cards',
        //       },
        //     },
        //     {
        //       name: 'file-upload',
        //       path: 'file-upload',
        //       component: () => import('../components/ui/file-upload/FileUpload'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/File-Upload',
        //       },
        //     },
        //     {
        //       name: 'chips',
        //       path: 'chips',
        //       component: () => import('../components/ui/chips/Chips'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Chips',
        //       },
        //     },
        //     {
        //       name: 'tree-view',
        //       path: 'tree-view',
        //       component: () => import('../components/ui/tree-view/TreeView'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Tree-view',
        //       },
        //     },
        //     {
        //       name: 'collapses',
        //       path: 'collapses',
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Collapse',
        //       },
        //       component: () => import('../components/ui/collapse/Collapses'),
        //     },
        //     {
        //       name: 'colors',
        //       path: 'colors',
        //       component: () => import('../components/ui/colors/Colors'),
        //     },
        //     {
        //       name: 'spacing',
        //       path: 'spacing',
        //       component: () => import('../components/ui/spacing/Spacing'),
        //     },
        //     {
        //       name: 'sliders',
        //       path: 'sliders',
        //       component: () => import('../components/ui/sliders/Sliders'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Sliders',
        //       },
        //     },
        //     {
        //       name: 'popovers',
        //       path: 'popovers',
        //       component: () => import('../components/ui/popovers/Popovers'),
        //     },
        //     {
        //       name: 'chat',
        //       path: 'chatPage',
        //       component: () => import('../components/ui/chat/ChatPage'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Chat',
        //       },
        //     },
        //     {
        //       name: 'tabs',
        //       path: 'tabs',
        //       component: () => import('../components/ui/tabs/Tabs'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Tabs',
        //       },
        //     },
        //     {
        //       name: 'lists',
        //       path: 'lists',
        //       component: () => import('../components/lists/Lists.vue'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Lists',
        //       },
        //     },
        //   ],
        // },
        // {
        //   name: 'maps',
        //   path: 'maps',
        //   component: EmptyParentComponent,
        //   children: [
        //     {
        //       name: 'google-maps',
        //       path: 'google-maps',
        //       component: () => import('../components/maps/google-maps/GoogleMapsPage'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Maps',
        //       },
        //     },
        //     {
        //       name: 'yandex-maps',
        //       path: 'yandex-maps',
        //       component: () => import('../components/maps/yandex-maps/YandexMapsPage'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Maps',
        //       },
        //     },
        //     {
        //       name: 'leaflet-maps',
        //       path: 'leaflet-maps',
        //       component: () => import('../components/maps/leaflet-maps/LeafletMapsPage'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Maps',
        //       },
        //     },
        //     {
        //       name: 'bubble-maps',
        //       path: 'bubble-maps',
        //       component: () => import('../components/maps/bubble-maps/BubbleMapsPage'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Maps',
        //       },
        //     },
        //     {
        //       name: 'line-maps',
        //       path: 'line-maps',
        //       component: () => import('../components/maps/line-maps/LineMapsPage'),
        //       meta: {
        //         wikiLink: 'https://github.com/epicmaxco/vuestic-admin/wiki/Maps',
        //       },
        //     },
        //   ],
        // },
        // {
        //   name: 'pages',
        //   path: 'pages',
        //   component: EmptyParentComponent,
        //   children: [
        //     {
        //       name: '404-pages',
        //       path: '404-pages',
        //       component: () => import('../components/pages/404-pages/404PagesPage'),
        //     },
        //   ],
        // },
      ],
    },
  ],
})
